package com.lzs.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author 刘中帅
 * @since 2020-11-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_dept")
@ApiModel(value="Dept对象", description="部门表")
public class Dept implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "dept_id", type = IdType.ASSIGN_ID)
    private Long deptId;

    @ApiModelProperty(value = "父部门id")
    private Long pid;

    @ApiModelProperty(value = "父级ids")
    private String pids;

    @ApiModelProperty(value = "简称")
    private String simpleName;

    @ApiModelProperty(value = "全称")
    private String fullName;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "版本（乐观锁保留字段）")
    private Integer version;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "创建人")
    private Long createUser;

    @ApiModelProperty(value = "修改人")
    private Long updateUser;

    @TableField(exist = false)
    @ApiModelProperty(value = "父级部门名称")
    private String pname;

    @TableField(exist = false)
    private List<Dept> children=new ArrayList<>();

}
